package com.bwie.service.Impl;

import com.bwie.service.MyService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class MyServiceImpl implements MyService {
    @Async
    @Override
    public void sendMessage(String message) {
        System.out.println("发送通知:"+message);

    }
    @Async
    @Override
    public void sendSms(String message) {
        System.out.println("发送手机号:"+message);
    }
    @Async
    @Override
    public void sendEmeil(String message) {
        System.out.println("发送邮箱:"+message);

        throw new RuntimeException("发送通知异常");
    }
}
